package org.liuchang.service;

import org.liuchang.dao.PayMapper;
import org.liuchang.dao.TypeMapper;
import org.liuchang.model.Pay;
import org.liuchang.model.Type;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TypeService {

    @Autowired
    private TypeMapper typeMapper;


    public List<Type> findByType(Integer i){
        String type;
        if(i==0){
            type = "收入";
        }else {
            type = "支出";
        }
        return typeMapper.findByType(type);
    }
}
